#ifndef MODELITEMS_H
#define MODELITEMS_H

#include <QAbstractListModel>
#include <QDebug>
#include "backendfiles/listmaintence.h"
class ModelItems : public QAbstractListModel
{
    Q_OBJECT
public:
    explicit ModelItems(QObject *parent = 0);
    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
    int rowCount(const QModelIndex &parent = QModelIndex()) const;
private:
    QList<QString>* itemsList;
    QString getItemInfo(QString,  QString) const;
    enum Roles {
        ItemID = Qt::UserRole + 1,
        ItemName,
        ItemIcon
    };
    QHash<int, QByteArray> roleNames() const;
signals:

public slots:
    void addRow(const QString &);
    void remRow(const QString &);



};

#endif // MODELITEMS_H
